<?php

namespace App\Models\Task\SnapTaskAssist;

class AcceleratorPack
{

    private int    $count;
    private string $user_id;
    private int    $package_number;

    public function __construct(string $user_id, int $count = 0)
    {
        $this->user_id = $user_id;
        $this->count   = 1;
        if ($count > 0) {
            $this->count = $count;
        }
        $this->package_number = 2 * $this->count;
    }


    public function getUserId(): string
    {
        return $this->user_id;
    }

    /**
     * @return int 助力包数量
     */
    public function getPackageNumber(): int
    {
        return $this->package_number;
    }

    /**
     * @return int 助力次数
     */
    public function getCount(): int
    {
        return $this->count;
    }
}